<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>我的出行</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="css/all_css.css" />
		<link rel="stylesheet" type="text/css" href="css/weui/base.css" />
		<link rel="stylesheet" type="text/css" href="lib/weui.css" />
		<link rel="stylesheet" type="text/css" href="css/weui/jquery-weui.css" />
		<style type="text/css">
			#my_main {
				max-width: 640px;
				min-width: 320px;
				width: 100%;
				margin: 0px auto;
				padding-bottom: 55px;
			}
			
			body {
				background-color: #F5F5F5;
			}
			
			.app_head_mid {
				float: left;
				width: 100%;
				margin-top: 3px;
			}
			
			#app_head_title {
				text-align: center;
				color: #FFFFFF;
				font-size: 1.6em;
				font-family: "宋体";
			}
			/*----页面底部----*/
			
			footer p {
				position: relative;
				top: -6px;
				color: #999999;
			}
			/*----*/
			
			.midPic {
				width: 100%;
				height: 160px;
				background-image: url(img/my/my_bgimg.png);
				background-size: 100% 100%;
				text-align: center;
			}
			
			.midPic a img {
				height: 50%;
				margin-top: 25px;
			}
			
			#dlts {
				color: #FFFFFF;
				font-size: 1.1em;
				margin-top: 5px;
			}
			
			.weui_cells {
				margin-top: 0;
			}
			
			.weui_cell {
				height: 3.5em;
			}
			
			.weui_cell_bd p {
				display: block;
				color: #666666;
				font-size: 1.2em;
				margin-left: 8px;
				font-family: "黑体";
			}
			
			.weui_cell_hd {
				width: 30px;
			}
			
			.weui_cell_hd img {
				width: 100%;
			}
			/*----退出当前账号按钮----*/
			
			#logoutUser {
				display: block;
				margin-top: 15px;
				height: 45px;
				text-align: center;
				line-height: 43px;
				color: #FFFFFF;
				border-radius: 8px;
				background-color: #F43530;
				width: 100%;
				font-family: Tahoma, fzltxhk, "\5fae\8f6f\96c5\9ed1";
				font-size: 1.2em;
				margin-bottom: 30px;
			}
			
			#dlts {
				font-size: 1.15em;
			}
			
			#my_mid {
				padding-top: 70px;
			}
		</style>
	</head>

	<body ontouchstart>
		<div id="my_main">
			<div class="index_head">
				<div class="app_head_mid">
					<p id="app_head_title">我的出行</p>
				</div>
			</div>
			<div id="my_mid">
				<div class="midPic">
					<a id="jumpToLogin">
						<img src="img/my/bigtouxiang.png" />
						<p id="dlts">请点击头像进行登录</p>
					</a>
				</div>
				<div class="weui_cells weui_cells_access">
					<!--<a class="weui_cell" href="application.html">
						<div class="weui_cell_hd">
							<img src="img/my/icon_app_my.png" alt="icon" style="margin-right:5px;display:block">
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<p>应用管理</p>
						</div>
						<div class="weui_cell_ft"></div>
					</a>-->
					<a class="weui_cell" onclick="toChangePwd()">
						<div class="weui_cell_hd">
							<img src="img/my/zhanghaoanquan.png" alt="icon" style="margin-right:5px;display:block">
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<p>修改密码</p>
						</div>
						<div class="weui_cell_ft"></div>
					</a>
					<a class="weui_cell" onclick="toycxl()">
						<div class="weui_cell_hd">
							<img src="img/my/my_2.png" alt="icon" style="margin-right:5px;display:block">
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<p>预存路线</p>
						</div>
						<div class="weui_cell_ft"></div>
					</a>
					<a class="weui_cell" href="javascript:;" onclick="toCollect()">
						<div class="weui_cell_hd">
							<img src="img/my/my_3.png" alt="icon" style="margin-right:5px;display:block">
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<p>目的地收藏</p>
						</div>
						<div class="weui_cell_ft"></div>
					</a>
					<a class="weui_cell" href="javascript:;" onclick="tosharing()">
						<div class="weui_cell_hd">
							<img src="img/my/lukuanggongxiang.png" alt="icon" style="margin-right:5px;display:block">
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<p>路况共享</p>
						</div>
						<div class="weui_cell_ft"></div>
					</a>
					<a class="weui_cell" href="javascript:;" onclick="toTourShare()">
						<div class="weui_cell_hd">
							<img src="img/my/my_share.png" alt="icon" style="margin-right:5px;display:block">
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<p>游记分享</p>
						</div>
						<div class="weui_cell_ft"></div>
					</a>

					<a class="weui_cell" href="fwjd.html">
						<div class="weui_cell_hd">
							<img src="img/my/jiandu.png" alt="icon" style="margin-right:5px;display:block">
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<p>服务监督</p>
						</div>
						<div class="weui_cell_ft"></div>
					</a>
					<a class="weui_cell" href="about.html">
						<div class="weui_cell_hd">
							<img src="img/my/guanyuwomen.png" alt="icon" style="margin-right:5px;display:block">
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<p>关于我们</p>
						</div>
						<div class="weui_cell_ft"></div>
					</a>
				</div>
				<a href="javascript:;" id="logoutUser" style="display: none;">
					退出当前帐号
				</a>
			</div>

			<footer>
				<li>
					<a href="index01.html">
						<div>
							<img src="img/index/index__normol.png" />
						</div>
						<p>首页</p>
					</a>
				</li>
				<li>
					<a href="cxgh.html">
						<div>
							<img src="img/index/chuxingguihuazhengchang.png" />
						</div>
						<p>出行规划</p>
					</a>
				</li>
				<li>
					<a href="#">
						<div>
							<img src="img/index/my__.png" />
						</div>
						<p style="color: #0070B4;">我的出行</p>
					</a>
				</li>
			</footer>
		</div>

		<script src="js/jquery-1.11.0.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/weui/jquery-weui.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$("#jumpToLogin").click(function() {
				if(this.children[1].innerHTML == "请点击头像进行登录") {
					//当还没登录的状态下执行
					window.location.href = "Login.html";
				}
			});
			$("#logoutUser").click(function() {
				t = this;
				$.confirm("确定退出当前账号？", function() {
					//点击确认后的回调函数
					localStorage.removeItem("userJson");
					$("#dlts").html("请点击头像进行登录");
					t.style.display = "none";
				}, function() {
					//点击取消后的回调函数
				});

			});
			
			$(function() {
				if(localStorage.userJson) {
					var userNameStr = JSON.parse(localStorage.userJson)[0].username;
					var userNameArr = userNameStr.split("");
					userNameArr.splice(3, 4, "XXXX");
					var userName = userNameArr.join("");
					//					console.log(userName);
					$("#dlts").html(userName);
					document.getElementById("logoutUser").style.display = "block";
				}
			});

			function toChangePwd() {
				if(!localStorage.userJson) {
					$.alert("请您先登录", "提示");
				} else {
					window.location.href = "changePwd.html";
				}
			}
			//			function tofwjd(){
			//				if(!localStorage.userJson) {
			//					$.alert("请您先登录", "提示");
			//				}else{
			//					window.location.href="fwjd.html";
			//				}
			//			}
			function toycxl() {
				if(!localStorage.userJson) {
					$.alert("请您先登录", "提示");
				} else {
					window.location.href = "ycxl.html";
				}
			}

			function toCollect() {
				if(!localStorage.userJson) {
					$.alert("请您先登录", "提示");
				} else {
					window.location.href = "collection.html";
				}
			}

			function tosharing() {
				//				if(!localStorage.userJson) {
				//					$.alert("请您先登录", "提示");
				//				}else{
				window.location.href = "roadSharing.html";
				//				}
			}

			function toTourShare() {
				window.location.href = "tour_share.html";
			}
			
			
		</script>
	</body>

</html>